- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 40
fix: prompt to run mix deps.get if deps are out of sync on start #338
Conversation
| Thanks for getting this started! I believe I need to change the timeout in GenLSP, as it's only waiting 5 seconds for you to click the button. Also, that function should return with the response from the editor, so you'll need to use it. I assume that's why you say "they go nowhere" Great work! | 
| Ah, I hadn't dug deep and assumed the whole message cycle was going to be asynchronous. It seems like we need to handle the case where the user does nothing, ignores it, or doesn't get to the message in time. Can we tell the message to clear? Also, I think I need to think a bit on the mix error capturing as well. There could be a legitimate error (like the dep won't compile because host tools are missing or something, etc) and we wouldn't want to prompt in that case. I think a majority of cases are solved with  | 
| 
 I think that we most likely want the function to never time out, and if you want it to not block, you run it in a task and set a timeout on that, and handle accordingly. 
 i'll have to research that | 
| Another thing to consider is the state of the runtime when we know there is an error with it. Meaning, if there are errors, it should pause and wait for some direction and not just go into a restart loop | 
| 
 🤔 hmm. This will take some thought as well. The  | 
| It is probably acceptable to explicitly handle errors from the deps.loadpath call. the runtime currently has some implicit state (if there is a node in the process state, it is considered "ready"), but it might be worth it to turn it into an explicit state machine (possibly using gen_statem) | 
4e69b87    to
    94c20a7      
    Compare
  
    5e86bf5    to
    802f1fe      
    Compare
  
    Partially addresses elixir-tools#53 elixir-tools#115 elixir-tools#285 Co-authored-by: Mitchell Hanberg <[email protected]>
802f1fe    to
    3adbc77      
    Compare
  
    
2023-11-15
This is just the start of a basic idea for prompting when mix dep failures occur. I'm getting the prompt, but
GenLSP.request/2is timing out which causes runtime to crash and my yes/no clicks seem to go nowhere. Timed out for now, but starting this draft in case others are able to look before me:GenLSP timeout + Runtime crash